
package net.swa.dewei.service.impl;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;
import net.sf.json.JSONObject;
import net.swa.dewei.service.BackUpDbService;
import net.swa.util.BuzConst;
import net.swa.util.MySecureProtocolSocketFactory;

@Service("backUpDbService")
public class BackUpDbServiceImpl implements BackUpDbService
{

    private static Logger log = Logger.getLogger(BackUpDbServiceImpl.class);

    public void exportDataBase()
    {
        log.debug("调用接口备份数据库,开始。。。");
        String http = BuzConst.HTTP_BACKUP_MYSQL;
        String resp;
        try
        {
//            if (!StringUtils.isBlank(http))
//            {
//                resp = MySecureProtocolSocketFactory.get(http);
//                JSONObject jsonObj = JSONObject.fromObject(resp.toString());
//                if (null != jsonObj)
//                {
//                    if (null != jsonObj.get("message"))
//                    {
//                        log.debug("调用接口备份数据库结果" + jsonObj.get("message"));
//                    }
//                }
//            }
            log.debug("调用接口备份数据库,结束。。。");

        }
        catch (Exception e)
        {
            e.printStackTrace();
        }

    }
}